package com.mbengue.corp.artisan.modele;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;

@Entity
@DiscriminatorValue("Devis")
@NamedNativeQueries(value = {
    @NamedNativeQuery(name = "tousLesDevis", query = "select * from feuille where type='Devis'", resultClass = Devis.class),
    @NamedNativeQuery(name = "trouverDevisParDate", query = "select * from feuille where date >= ? and date < ? and type = 'Devis'", resultClass = Devis.class),
    @NamedNativeQuery(name = "trouverDevisParClient", query = "select * from feuille where client = ? and type = 'Devis'", resultClass = Devis.class),
    @NamedNativeQuery(name = "trouverDevisParArtisan", query = "select * from feuille where artisan = ? and type = 'Devis'", resultClass = Devis.class) })
public class Devis extends Feuille {
  private static final long serialVersionUID = -1935097385953629876L;

	public Devis() {
	}

  @Override
  public String toString() {
    return "Devis: " + super.toString();
  }
}
